<script type="text/javascript">
    var date = new Date();
    var curDate = new Date();
    while(curDate-date < 2000) {
      curDate = new Date();
    };

    document.write("<html><h1>hello</h1></html>");
</script>
